package thread;

/*
 * @author zzr
 * @date: 2025/04/02  20:24
 * @description:
 */

class SingletonLazy {
    private volatile static SingletonLazy instance = null;

    static Object locker = new Object();

    public static SingletonLazy getInstance() {
        if(instance == null) {
            synchronized (locker) {
                if (instance == null) {
                    instance = new SingletonLazy();
                }
            }
        }
        return instance;
    }
    private SingletonLazy() { }
}
public class ThreadDemo36 {

}
